<?php
include "conn.php";

//获取前端出入的用户名，进行存在检测
if(isset($_POST['username'])){
    $username = $_POST['username'];
    $result = $conn->query("select * from registry where username='$username' or tel='$username'");
    if($result->fetch_assoc()){//存在结果，登录成功
        echo 'true';
    }else{//登录失败
        echo 'false';
    }
}